<?php

$input = file_get_contents('php://input');
$my_array = json_decode($input, TRUE);

//echo $my_array['rows'][0]['name'];
$id = $my_array['rows'][0]['id'];
$name = $my_array['rows'][0]['name'];

$prov = Province::load($id);
$prov->setName($name);
$prov->update();

echo '{success:true}';
?>
